package com.jluzh.exception;

import com.jluzh.constant.ExceptionCode;
import lombok.Getter;

/**
 * @author EvanHuang
 * @date 11/6/2018 9:27 AM
 * @since
 */
@Getter
public class ApplicationException extends RuntimeException{
    private static final long serialVersionUID = 1L;
    private ExceptionCode code = ExceptionCode.DEFAULT_ERROR;

    public ApplicationException(String msg) {
        super(msg);
    }

    public ApplicationException(String msg, ExceptionCode code) {
        super(msg);
        this.code = code;
    }

    public ApplicationException(String msg, ExceptionCode code,
                                Throwable cause) {
        super(msg, cause);
        this.code = code;
    }

}
